/*
import newsListData from '../../../common/newsListData.js'
import router from '@system.router';
export default {
    data() {
        return {
            newsData: newsListData
        }
    },
    newsClick(id){
//        const i = this.$element(id);
        console.info('--------------------------'+id);
        router.push({
            uri:'pages/homepage/newsDetail/newsDetail',
            params:{chooseId:id}
        })
    }
}*/

import newsTabbarData from '../../../common/newsIndexData.js'

export default {
    data() {
        return {
            newsTabbardata:newsTabbarData
        }
    },
    onInit() {
    },
    changeTabIndex(e) {
        for (let i = 0; i < this.newsTabbardata.length; i++) {
            let element = this.newsTabbardata[i];
            element.show = false;
            if (i === e.index) {
                element.show = true;
            }
        }
    }
}

